home *** CD-ROM | disk | FTP | other *** search
/ Double-Click / Double Click - Issue 1 (Pentrisoft).adf / Mag1 / Lottery.doc < prev    next >
Text File  |  1996-07-24  |  4KB  |  45 lines

  1. <H2><B>Lottery Programs</B>
  2. <H3>
  3. If there's one sort of program that is abundant in the public domain, then it's lottery programs! Of course, there are different sorts, but most attempt to predict future lottery outcomes.
  4.  
  5. <B>Aaargh!!! </B>Don't people realise that it is random? What next, a crystal ball gazing program to tell the future? I'm not particularly having a go at the programmers, as it's as good a program as any to do, but some people honestly believe that the outcome is predictable.
  6.  
  7. Are some balls more likely to come out than others? Well even if we forget that there are different machines, and different sets of balls, we must consider how the 'starting conditions' differ each week. It soon becomes apparent that the thing which differs is the position of those arms which spin around in the middle. Surely that can't make too much of a difference, can it?
  8.  
  9. Wrong! And chaos theory is the reason. I haven't got room to go into it in depth, but basically, chaos theory states that only a small change in the starting conditions results in a huge change in the outcome. And the lottery machine is certainly a chaotic machine!
  10.  
  11. Think about it, the position of those spinning arms determine which balls are hit first, and if the position of the arms cannot be predicted, then the entire future paths of every one of those balls becomes unpredictable. Just think how many collisions take place. And if one ball slightly misses another instead of hitting it, its future path is instantly changed.
  12.  
  13. You cannot of course predict where those spinning arms are, as it depends on when the person releases the balls, and only a split second difference results in a completely different position.
  14.  
  15. To summarise, I once saw an advert for one of these lottery predictors, which stated: There is no such thing as a truly random machine, and therefore it can be predicted. Well, there <I>are </I>such things as truly random events (quantum mechanics), and even if it is not random, as I have said, that doesn't mean it can be predicted (chaos theory).
  16.  
  17. <B>So </B>are there any lottery programs that are useful? Well random number generators would be useful for people who can't be bothered to think up numbers themselves. More importantly are syndicate programs, which check the numbers against a database to see if you've one, and also, one which I have written myself (Lottery Numbers, available as PD) and I shall explain here...
  18.  
  19. One important point if you win four or more numbers is that how much you win depends largely on the number of jackpot winners, so it makes sense if you pick numbers that don't tend to be chosen by other people.
  20.  
  21. The way I approached this was by storing a database of the numbers each week, together with the number of people who won the jackpot (ie, all six numbers) in each particular week.
  22.  
  23. Next, the program calculated a number (I shall call STORE), for each of the 49 balls (so you would use an array of some kind).
  24.  
  25. For each week, if the ball came up, the program would add the number of jackpot winners to STORE. We also need to know the total number of times which each bell has appeared (AMOUNT). In 'pseudo code':
  26.   For K = 1 to 49
  27.     For L = 1 to Number of Weeks
  28.       If Ball K came up in Week L
  29.         STORE(K)=STORE(K)+Number of winners in Week L
  30.         AMOUNT(K)=AMOUNT(K)+1
  31.       Endif
  32.     Next L
  33.   Next K
  34. Don't type this direct into a programming language! Pseudo code means it is a cross between English and a programming language (BASIC in this case).
  35.  
  36. The last step is to calculate STORE divided by AMOUNT for each ball, as this gives a sort of average number. The balls with the lowest value of STORE/AMOUNT are the balls less likely to be chosen by other people.
  37.  
  38. You can also make it apply modifications, such as (square) rooting the number of winners before they are added to STORE. This reduces the effect of 'freak' values such as 133 winners that once occured. Another possibility is to use it to 'guess' how many winners there will be if a given set of numbers come up.
  39.  
  40. Obviously, this method does not take into account any patterns between the numbers (for people drawing 'cross' patterns on their tickets, for example).
  41.  
  42. Anyway, Lottery Numbers is available as Public Domain (try Ground Zero). Alternatively, get it from me for just #À2, and I'll also provide the AMOSPro source code, if you request it (cheques made payable to Mark Harman, send it to the usual 'DoubleClick!' address.
  43.  
  44. <H2><B>Mark Harman</B>
  45.